package com.chen.project.white_jotter.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.chen.project.white_jotter.pojo.User;

import java.util.List;

public interface UserMapper extends BaseMapper<User> {
    int deleteByPrimaryKey(Integer id);

    int insert(User record);

    int insertSelective(User record);

    User selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(User record);

    int updateByPrimaryKey(User record);


    ////////////////////////////////////////////////////////////////////////////////////////////////////////
    User selectUserByUsername(String username);

    User selectUserByUsernameAndPassword(String username,String password);

    List<User> selectAllUsers();

    // 通过用户名查询用户id
    Integer selectUserIdByUsername(String userName);
}